﻿using BigEgg.Framework.Foundation;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Globalization;
using UnitTestDemo.Applications.Humans;
using UnitTestDemo.Applications.Properties;

namespace UnitTestDemo.Applications.Test.Humans
{
    [TestClass]
    public class ContactInfoTest
    {
        [TestMethod]
        public void ValueValidationTest()
        {
            ContactInfo contact = new ContactInfo();
            Assert.AreNotEqual(string.Empty, contact.Validate("Value"));

            contact.Value = @"https://unittestdemo.codeplex.com/";
            Assert.AreEqual(string.Empty, contact.Validate("Value"));

            contact.Value = "  ";
            Assert.AreEqual(
               string.Format(CultureInfo.CurrentCulture, Resources.ValueMandatory),
               contact.Validate("Value"));
        }
    }
}
